﻿
using CSharpLibs.Annotations;

#pragma warning disable 0169

namespace System.IO
{
	[Builtin, BuiltinImplementation]
	public class StdOut : TextWriter
	{
		private int state;

		[BuiltinMethod, BuiltinSemantics("stdout_init")]
		[UsedModStatics("System.ExternalState.fsstate")]
		public StdOut()
		{ ;}

		public override void Close()
		{ ;}

		[BuiltinMethod, BuiltinSemantics("stdout_writechar")]
		[UsedModStatics("System.ExternalState.fsstate")]
		public override void Write(char value)
		{ ;}

		public override void Write(char[] buffer)
		{
			for(int i = 0; i < buffer.Length; ++i)
				this.Write(buffer[i]);
		}

		public override void Write(string value)
		{
			this.Write(value.ToCharArray());
		}

		public override void Write(char[] buffer, int index, int count)
		{
			for(int i = 0; i < count; ++i)
				this.Write(buffer[index + i]);
		}
	}
}

#pragma warning restore 0169
